<!DOCTYPE html>
<html lang="en">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>

  var i=59;
  function timelyFun() {
      if(i>0){
          document.getElementById("dzf").innerHTML = i;
          i--;
      }else{
          document.getElementById("dzf").innerHTML = "订单支付超时";

         // document.getElementById("sm").style.display="none";
      }

  }
    function funcTest(){

        //每隔3秒执行一次timelyFun方法

        window.setInterval("timelyFun()",1000);

    }

    window.onload = funcTest;
</script>
<body>
    <h1>结算页面</h1>

<div>
    待支付,倒计时：
    <span id="dzf"></span>
    <form action="/pay">
        <input type="text" class="form-control1" id="order_no" name="order_no" th:value="${order_no}">
        <input type="submit" id="sm" value="去支付">
    </form>
</div>




</body>
</html>